home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gxttf.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  3.6 KB  |  162 lines

  1. /* Copyright (C) 2000 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gxttf.h,v 1.2 2000/09/19 19:00:40 lpd Exp $ */
  20. /* Table definitions for TrueType fonts */
  21.  
  22. #ifndef gxttf_INCLUDED
  23. #  define gxttf_INCLUDED
  24.  
  25. /* ------ head ------ */
  26.  
  27. typedef struct ttf_head_s {
  28.     byte
  29.     version[4],        /* version 1.0 */
  30.     fontRevision[4],
  31.     checkSumAdjustment[4],
  32.     magicNumber[4],
  33.     flags[2],
  34.     unitsPerEm[2],
  35.     created[8],
  36.     modified[8],
  37.     xMin[2],
  38.     yMin[2],
  39.     xMax[2],
  40.     yMax[2],
  41.     macStyle[2],
  42.     lowestRecPPM[2],
  43.     fontDirectionHint[2],
  44.     indexToLocFormat[2],
  45.     glyphDataFormat[2];
  46. } ttf_head_t;
  47.  
  48. /* ------ hhea ------ */
  49.  
  50. typedef struct ttf_hhea_s {
  51.     byte
  52.     version[4],        /* version 1.0 */
  53.     ascender[2],        /* FWord */
  54.     descender[2],        /* FWord */
  55.     lineGap[2],        /* FWord */
  56.     advanceWidthMax[2],    /* uFWord */
  57.     minLeftSideBearing[2],    /* FWord */
  58.     minRightSideBearing[2],    /* FWord */
  59.     xMaxExtent[2],        /* FWord */
  60.     caretSlopeRise[2],
  61.     caretSlopeRun[2],
  62.     caretOffset[2],
  63.     reserved[8],
  64.     metricDataFormat[2],    /* 0 */
  65.     numHMetrics[2];
  66. } ttf_hhea_t;
  67.  
  68. /* ------ hmtx ------ */
  69.  
  70. typedef struct longHorMetric_s {
  71.     byte
  72.     advanceWidth[2],    /* uFWord */
  73.     lsb[2];            /* FWord */
  74. } longHorMetric_t;
  75.  
  76. /* ------ maxp ------ */
  77.  
  78. typedef struct ttf_maxp_s {
  79.     byte
  80.     version[2],        /* 1.0 */
  81.     numGlyphs[2],
  82.     maxPoints[2],
  83.     maxContours[2],
  84.     maxCompositePoints[2],
  85.     maxCompositeContours[2],
  86.     maxZones[2],
  87.     maxTwilightPoints[2],
  88.     maxStorage[2],
  89.     maxFunctionDefs[2],
  90.     maxInstructionDefs[2],
  91.     maxStackElements[2],
  92.     maxSizeOfInstructions[2],
  93.     maxComponentElements[2],
  94.     maxComponentDepth[2];
  95. } ttf_maxp_t;
  96.  
  97. /* ------ OS/2 ------ */
  98.  
  99. typedef struct ttf_OS_2_s {
  100.     byte
  101.     version[2],        /* version 1 */
  102.     xAvgCharWidth[2],
  103.     usWeightClass[2],
  104.     usWidthClass[2],
  105.     fsType[2],
  106.     ySubscriptXSize[2],
  107.     ySubscriptYSize[2],
  108.     ySubscriptXOffset[2],
  109.     ySubscriptYOffset[2],
  110.     ySuperscriptXSize[2],
  111.     ySuperscriptYSize[2],
  112.     ySuperscriptXOffset[2],
  113.     ySuperscriptYOffset[2],
  114.     yStrikeoutSize[2],
  115.     yStrikeoutPosition[2],
  116.     sFamilyClass[2],
  117.     /*panose:*/
  118.         bFamilyType, bSerifStyle, bWeight, bProportion, bContrast,
  119.         bStrokeVariation, bArmStyle, bLetterform, bMidline, bXHeight,
  120.     ulUnicodeRanges[16],
  121.     achVendID[4],
  122.     fsSelection[2],
  123.     usFirstCharIndex[2],
  124.     usLastCharIndex[2],
  125.     sTypoAscender[2],
  126.     sTypoDescender[2],
  127.     sTypoLineGap[2],
  128.     usWinAscent[2],
  129.     usWinDescent[2],
  130.     ulCodePageRanges[8];
  131. } ttf_OS_2_t;
  132.  
  133. /* ------ vhea ------ */
  134.  
  135. typedef struct ttf_vhea_s {
  136.     byte
  137.     version[4],        /* version 1.0 */
  138.     ascent[2],        /* FWord */
  139.     descent[2],        /* FWord */
  140.     lineGap[2],        /* FWord */
  141.     advanceHeightMax[2],    /* uFWord */
  142.     minTopSideBearing[2],    /* FWord */
  143.     minBottomSideBearing[2],  /* FWord */
  144.     yMaxExtent[2],        /* FWord */
  145.     caretSlopeRise[2],
  146.     caretSlopeRun[2],
  147.     caretOffset[2],
  148.     reserved[8],
  149.     metricDataFormat[2],    /* 0 */
  150.     numVMetrics[2];
  151. } ttf_vhea_t;
  152.  
  153. /* ------ vmtx ------ */
  154.  
  155. typedef struct longVerMetric_s {
  156.     byte
  157.     advanceHeight[2],    /* uFWord */
  158.     topSideBearing[2];    /* FWord */
  159. } longVerMetric_t;
  160.  
  161. #endif /* gxttf_INCLUDED */
  162.